﻿namespace MessageTypeDescriber.Utils
{
    public class NameUtils
    {
        public static string Short(string name)
        {
            if (string.IsNullOrEmpty(name))
            {
                return "";
            }
            int firstApostrophe = name.IndexOf('`');
            if (firstApostrophe > 0)
            {
                name = name.Substring(0, firstApostrophe);
            }
            return name.Substring(name.LastIndexOf(".")+1);
        }
    }
}